package com.jzo2o.customer.controller.open;

import com.jzo2o.common.model.Result;
import com.jzo2o.customer.model.dto.request.InstitutionRegisterReqDTO;
import com.jzo2o.customer.service.RegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author itlxc
 * @since 2024-10-13
 */
@RequestMapping("/open/serve-provider/institution")
@RestController
@RequiredArgsConstructor
@Api(tags = "机构人员注册注册接口")
@Slf4j
public class RegisterController {

    private final RegisterService registerService;

    @PostMapping("/register")
    @ApiOperation("机构人员注册注册")
    public Result register(@RequestBody InstitutionRegisterReqDTO dto) {
        log.info("机构人员注册注册参数：{}", dto);
        registerService.register(dto);
        return Result.ok();
    }

}
